/* @(#)GSBargainQueryAction.java    V0.1
 *
 * Project: GSdevelop
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   owen         2006-4-22
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.action;

import java.util.ArrayList;

import org.apache.commons.beanutils.BeanUtils;

import com.hitrust.gs.business.GSBargainProcessor;
import com.hitrust.gs.form.GSBargainQueryForm;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;
import com.hitrust.gs.util.page.ResultProcess;
import com.hitrust.gs.vo.GSBargainQueryVO;

/**
 * 查询合同信息
 */
public class GSBargainQueryAction extends GSBaseAction {

    public String execute(GSBaseForm aForm) throws Exception {
        GSBargainQueryForm tForm = (GSBargainQueryForm)aForm;
        try{
            GSBargainProcessor tProc = new GSBargainProcessor();
            GSBargainQueryVO tGSBargainQueryVO=new GSBargainQueryVO();
            
            BeanUtils.copyProperties(tGSBargainQueryVO,tForm);
            
            ArrayList tList = tProc.getSearchBargain(tGSBargainQueryVO);
            ResultProcess tRsProc = new ResultProcess();
            tRsProc.setResult(tList);
            aForm.getRequest().setAttribute("Bargain",tRsProc);
            aForm.getRequest().setAttribute("requery","false");
        }
        catch(Exception e){
            tForm.getRequest().setAttribute("action","A170201.do");
            throw e;
        }
        return GSBaseConstants.FORWARD_SUCCESS;
    }       
}
